const {Schema, model} = require('mongoose')

const projectsSchema = new Schema({
  id: {
    type: String,
    required: true,
    unique: true,
  },
  title: {
    type: String,
    required: true,
  },
  text: {
    type: String,
    required: false,
  },
  startDate: {
    type: Date,
    required: false,
  },
  deadlineDate: {
    type: Date,
    required: false,
  },
  status: {
    type: String,
    required: true,
  },
  tasksIdsList: {
    type: [String],
    required: false,
  },
  teamId: {
    type: String,
    required: false,
  },
})

module.exports = model('Projects', projectsSchema)
